home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2002 #11
/
Amiga Plus CD - 2002 - No. 11.iso
/
Tools
/
ShareMailGiftware
/
AmigaTalk
/
testfiles
/
TestDBase2
< prev
next >
Wrap
Text File
|
2002-10-27
|
2KB
|
39 lines
addrBook open: 'SimpleAddressBook' for: record
( 'Executing the TestDBase2 file...' ) print
atalk setIOTitle: 'DBase example Tests (continued):'
atalk setIOMessage: 'Checking read:into: method...'
atalk displayString: 'Now I will read in the first record you entered.'
addrBook read: 1 into: recordData
('Retrieved DataBase Record #1:') print
nameStr <- recordData retrieveFieldAt: (record offsetAt: 1) length: (record fieldAt: 1) fieldWidth
('First Name: ', nameStr) print
surnameStr <- recordData retrieveFieldAt: (record offsetAt: 2) length: (record fieldAt: 2) fieldWidth
('Last Name: ', surnameStr) print
addressStr <- recordData retrieveFieldAt: (record offsetAt: 3) length: (record fieldAt: 3) fieldWidth
('Address : ', addressStr) print
cityStr <- recordData retrieveFieldAt: (record offsetAt: 4) length: (record fieldAt: 4) fieldWidth
('City/Town : ', cityStr) print
stateStr <- recordData retrieveFieldAt: (record offsetAt: 5) length: (record fieldAt: 5) fieldWidth
('State : ', stateStr) print
zipcodeStr <- recordData retrieveFieldAt: (record offsetAt: 6) length: (record fieldAt: 6) fieldWidth
('ZipCode : ', zipcodeStr) print
phoneStr <- recordData retrieveFieldAt: (record offsetAt: 7) length: (record fieldAt: 7) fieldWidth
('Phone # : ', phoneStr) print
atalk setIOTitle: 'DBase example finished!'
atalk displayString: 'The first record should now be in the Status window (Done!)'
addrBook close " Done with TestDBase2 file! "
( 'Finished with DBase testing!!' ) print